package net.shopxx.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import net.shopxx.dao.TaskDao;
import net.shopxx.entity.Member;
import net.shopxx.entity.Task;
import net.shopxx.pager.Page;
import net.shopxx.pager.Pageable;
import net.shopxx.service.TaskService;

/**
 * Service - 任务
 * 
 * @author frankie
 * @version 3.0
 */
@Service("taskServiceImpl")
public class TaskServiceImpl extends BaseServiceImpl<Task, Long> implements TaskService{

	@Resource(name = "taskDaoImpl")
	private TaskDao taskDao;
	
	@Resource(name = "taskDaoImpl")
	public void setBaseDao(TaskDao taskDao) {
		super.setBaseDao(taskDao);
	}
	
	@Override
	@Transactional(readOnly = true)
	public Page<Task> findPage(Pageable pageable) {
		return taskDao.findPage(pageable);
	}

	@Override
	@Transactional(readOnly = true)
	public Page<Task> findPage(Member member, Pageable pageable, boolean taskPublisher) {
		return taskDao.findPage(member, pageable, taskPublisher);
	}

}
